package com.clwl.supervise.superviseapp.controller;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.clwl.supervise.superviseapp.entity.result.ResultEntity;
import com.clwl.supervise.superviseapp.service.investigation.InvestigationService;

@RestController
@RequestMapping("/test")
public class TestController {
    @Resource
    private InvestigationService investigationService;


    @GetMapping("documentHelp")
    public ResultEntity checkUpdate(Long investigationId) {
    	Map<String, Object> documentHelp = investigationService.documentHelp(investigationId,null);
    	List<Map<String,Object>> caselist = investigationService.casePush(null);
    	documentHelp.put("law_enforcement_cases",caselist);
        if (documentHelp == null) {
            return ResultEntity.success();
        } else {
            return ResultEntity.success(documentHelp);
        }
    }
}
